package acom.test.swing.bb;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class MainFrame {

	private JFrame frame;
	
	static final int WIDTH = 1000;
	static final int HEIGHT = 750;
	
	public MainFrame(){
		frame = new JFrame();
		frame.setTitle("幸运大抽奖");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		try {
			// 将LookAndFeel设置成Windows样式
			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
			//Font font=new Font("楷体",Font.PLAIN,26);
			//UIManager.put("Label.font", font);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		
		//SystemUtil.showInCenter(frame);
		
		JPanel mainPanel = new MainPanel();		
		
		frame.add(mainPanel);
		frame.setSize(WIDTH, HEIGHT);
		frame.setVisible(true);
	}
	
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
            public void run() {
            	new MainFrame();
            }
        });
	}
	
}
